package com.wangsd.web.face.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table(name = "app_version")
@ApiModel(value = "app版本管理", description = "app版本管理")
public class AppVersion implements Serializable{
    /**
     * 以下是通用字段
     */
    @Id
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "版本号")
    private String versionNo;

    @ApiModelProperty(value = "是否强制更新")
    private Integer isMust;

    @ApiModelProperty(value = "下载地址")
    private String downUrl;

    @ApiModelProperty(value = "文件名称")
    private String fileName;

    @ApiModelProperty(value = "版本更细描述")
    private String description;

    @ApiModelProperty(value = "是否发布，0否，1是")
    @Column(name = "is_push",columnDefinition = "int(1) default 0 not null")
    private Integer isPush;

    @ApiModelProperty(value = "发布时间")
    private Date pushTime;
}
